#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

class Date
{
public:
    int operator-(const Date& date) const;
    bool operator==(const Date& date) const;
    bool operator!=(const Date& date) const;
    bool operator<(const Date& date) const;
    Date& operator++();

    //private:
    int _year;
    int _month;
    int _day;
};

bool Date::operator==(const Date& date) const
{
    return _year == date._year &&
        _month == date._month &&
        _day == date._day;
}

bool Date::operator!=(const Date& date) const
{
    return !(*this == date);
}

bool Date::operator<(const Date& date) const
{
    return _year < date._year ||
        _year == date._year && _month < date._month ||
        _year == date._year && _month == date._month && _day < date._day;
}

int GetMonthDay(int year, int month)
{
    int Day[] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
    if (month == 2 && ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0))
    {
        return 29;
    }
    return Day[month];
}

Date& Date::operator++()
{
    _day++;
    if (_day > GetMonthDay(_year, _month))
    {
        _day -= GetMonthDay(_year, _month);
        _month++;
        if (_month == 13)
        {
            _year++;
            _month = 1;
        }
    }
    return *this;
}

int Date::operator-(const Date& date) const
{
    Date Max = *this;
    Date Min = date;
    if (Max < Min)
    {
        Max = date;
        Min = *this;
    }

    int n = 0;
    while (Max != Min)
    {
        ++Min;
        n++;
    }

    return n + 1;
}

int main()
{
    Date d1, d2;
    while (scanf("%4d%2d%2d", &d1._year, &d1._month, &d1._day) != EOF)
    {
        scanf("%4d%2d%2d", &d2._year, &d2._month, &d2._day);
        int num = d1 - d2;
        cout << num << endl;
    }
    return 0;
}




